{% load static %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="{% static 'bootstrap-3.4.1/dist/css/bootstrap.min.css' %}">
</head>
<body>

<div class="container">
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">小辉科技</a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
                    <li><a href="/depart/">信息管理(供应商-客户)</a></li>
                    <li><a href="/goods/">商品管理</a></li>
                    <li><a href="/inout/">财务管理</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                           aria-expanded="false">选项 <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/depart/">个人资料</a></li>
                            <li><a href="/goods/">商品信息</a></li>
                            <li><a href="/inout/">收支分析</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">供应商信息</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="/package/">库存盘点</a></li>
                        </ul>
                    </li>
                </ul>
                <form class="navbar-form navbar-left">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="Search">
                    </div>
                    <button type="submit" class="btn btn-default">Submit</button>
                </form>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="#">来一个打赏吧亲</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                           aria-expanded="false">登录状态{{ info_dict }}<span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">切换用户</a></li>
                            <li><a href="#">登出</a></li>
                            <li><a href="#">注销账号</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">写给我们</a></li>
                        </ul>
                    </li>
                </ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>

    {% block content %}{% endblock %}
</div>

<div class="container">
    <div style="margin: 10px 0;">
        <a href="/add/provider/" class="btn btn-success">添加供应商信息</a>
    </div>


    <table class="table table-bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>供应商名称</th>
            <th>联系人</th>
            <th>联系方式</th>
            <th>城市</th>
            <th>供应商ID</th>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        {% for row in queryset1 %}
        <tr>
            <td>{{row.id}}</td>
            <td>{{row.pro_name}}</td>
            <td>{{row.linkman}}</td>
            <td>{{row.linkWay}}</td>
            <td>{{row.city}}</td>
            <td>{{row.provider_id}}</td>
            <td>
                <a href="/delete/provider/?id={{row.id}}" class="btn btn-danger btn-xs">删除</a>
                <a href="/edit/provider/?id={{row.id}}" class="btn btn-primary btn-xs">编辑</a>
            </td>
        </tr>
        {% endfor %}
        </tbody>
    </table>

    <div style="margin: 10px 0;">
        <a href="/add/member/" class="btn btn-success">添加用户</a>
    </div>

    <table class="table table-bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>姓名</th>
            <th>联系方式</th>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        {% for row in queryset %}
        <tr>
            <td>{{row.id}}</td>
            <td>{{row.name}}</td>
            <td>{{row.email}}</td>
            <td>
                <a href="/delete/member/?id={{row.id}}" class="btn btn-danger btn-xs">删除</a>
                <a href="/edit/member/?id={{row.id}}" class="btn btn-primary btn-xs">编辑</a>
            </td>
        </tr>
        {% endfor %}
        </tbody>
    </table>

    <div style="margin: 10px 0;">
        <a href="/add/worker/" class="btn btn-success">添加公司员工信息</a>
    </div>

    <table class="table table-bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>员工号</th>
            <th>员工姓名</th>
            <td>电话</td>
            <td>关联用户编号</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        {% for row in queryset2 %}
        <tr>
            <td>{{row.id}}</td>
            <td>{{row.worker_id}}</td>
            <td>{{row.worker_name}}</td>
            <td>{{row.telephone}}</td>
            <td>{{row.user_increment_id}}</td>
            <td>
                <a href="/delete/worker/?id={{row.id}}" class="btn btn-danger btn-xs">删除</a>
                <a href="/edit/worker/?id={{row.id}}" class="btn btn-primary btn-xs">编辑</a>
            </td>
        </tr>
        {% endfor %}
        </tbody>
    </table>


</div>
<script src="{% static 'jquery.min.js'%}"></script>
<script src="{% static 'bootstrap-3.4.1/dist/js/bootstrap.min.js'%}"></script>
<script src="{% static 'bootstrap-3.4.1/dist/css/bootstrap.min.js'%}"></script>
</body>
</html>